<!DOCTYPE html>
<html>
<head>
    <title>商城配置:通过商户信息列表</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <Row :gutter="16">
            <div class="search-group">
                <i-col span="2">
                    <i-input v-model="q.userId" @on-enter="query" placeholder="用户编号"/>
                </i-col>
                <i-col span="2">
                    <i-input v-model="q.userPhone" @on-enter="query" placeholder="用户手机号"/>
                </i-col>
                <i-col span="2">
                    <i-input v-model="q.userName" @on-enter="query" placeholder="用户名"/>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
            <div class="buttons-group">
                <!--#if($shiro.hasPermission("merchant:info"))-->
                <!--<i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;查看</i-button>-->
                <!--#end-->
                <!--#if($shiro.hasPermission("merchant:save"))-->
                <!--<i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>-->
                <!--#end-->
                <!--#if($shiro.hasPermission("merchant:update"))-->
                <!--<i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>-->
                <!--#end-->
                <!--#if($shiro.hasPermission("merchant:delete"))-->
                <!--<i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>-->
                <!--#end-->

                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;查看</i-button>
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
            </div>
        </Row>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
        <i-form ref="formValidate" :model="merchant" :rules="ruleValidate" :label-width="80">
            <Form-item label="平台用户编号" prop="userId">
                <i-input v-model="merchant.userId" placeholder="平台用户编号"/>
            </Form-item>
            <Form-item label="平台用户手机号" prop="ddPhone">
                <i-input v-model="merchant.ddPhone" placeholder="平台用户手机"/>
            </Form-item>
            <Form-item label="商户姓名" prop="realname">
                <i-input v-model="merchant.realname" placeholder="商户姓名"/>
            </Form-item>
            <Form-item label="商户名称" prop="name">
                <i-input v-model="merchant.name" placeholder="商户名称"/>
            </Form-item>
            <Form-item label="商户手机号" prop="phone">
                <i-input v-model="merchant.phone" placeholder="商户手机号"/>
            </Form-item>
            <Form-item label="商户地址" prop="address">
                <i-input v-model="merchant.address" placeholder="开户银行城市"/>
            </Form-item>
            <Form-item label="法人身份证号" prop="idcard">
                <i-input v-model="merchant.idcard" placeholder="身份证号"/>
            </Form-item>
            <Row>
                <i-col span="16">
                    <Form-item label="商户Logo" prop="logo">
                        <i-input v-model="merchant.logo" placeholder="商户Logo" />
                    </Form-item>
                </i-col>
                <i-col span="3">
                    <Form-item :label-width="1">
                        <Upload style="width: 300px;" action="../sys/oss/upload?prefix=merchant"
                                :format="['jpg','jpeg','png']"
                                max-size="2048"
                                :on-success="handleSuccessLogo" :on-format-error="handleFormatError"
                                :show-upload-list="false"
                                :on-exceeded-size="handleMaxSize">
                            <i-button icon="ios-cloud-upload-outline">上传图片</i-button>
                        </Upload>
                    </Form-item>
                </i-col>
                <i-col span="3">
                    <Form-item :label-width="1">
                        <i-button icon="eye" @click="eyeImageLogo">预览图片</i-button>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="16">
                    <Form-item label="身份证正面" prop="value">
                        <i-input v-model="merchant.value" placeholder="身份证正面" readonly/>
                    </Form-item>
                </i-col>
                <i-col span="3">
                    <Form-item :label-width="1">
                        <Upload style="width: 300px;" action="../sys/oss/upload?prefix=merchant"
                                :format="['jpg','jpeg','png']"
                                max-size="2048"
                                :on-success="handleSuccessIdUp" :on-format-error="handleFormatError"
                                :show-upload-list="false"
                                :on-exceeded-size="handleMaxSize">
                            <i-button icon="ios-cloud-upload-outline">上传图片</i-button>
                        </Upload>
                    </Form-item>
                </i-col>
                <i-col span="3">
                    <Form-item :label-width="1">
                        <i-button icon="eye" @click="eyeImageIdUp">预览图片</i-button>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="16">
                    <Form-item label="身份证反面" prop="value1">
                        <i-input v-model="merchant.value1" placeholder="身份证反面" readonly/>
                    </Form-item>
                </i-col>
                <i-col span="3">
                    <Form-item :label-width="1">
                        <Upload style="width: 300px;" action="../sys/oss/upload?prefix=merchant"
                                :format="['jpg','jpeg','png']"
                                max-size="2048"
                                :on-success="handleSuccessIdDown" :on-format-error="handleFormatError"
                                :show-upload-list="false"
                                :on-exceeded-size="handleMaxSize">
                            <i-button icon="ios-cloud-upload-outline">上传图片</i-button>
                        </Upload>
                    </Form-item>
                </i-col>
                <i-col span="3">
                    <Form-item :label-width="1">
                        <i-button icon="eye" @click="eyeImageIdDown">预览图片</i-button>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="16">
                    <Form-item label="商户资质" prop="license">
                        <i-input v-model="merchant.license" placeholder="商户资质" readonly/>
                    </Form-item>
                </i-col>
                <i-col span="3">
                    <Form-item :label-width="1">
                        <Upload style="width: 300px;" action="../sys/oss/upload?prefix=merchant"
                                :format="['jpg','jpeg','png']"
                                max-size="2048"
                                :on-success="handleSuccessLicense" :on-format-error="handleFormatError"
                                :show-upload-list="false"
                                :on-exceeded-size="handleMaxSize">
                            <i-button icon="ios-cloud-upload-outline">上传图片</i-button>
                        </Upload>
                    </Form-item>
                </i-col>
                <i-col span="3">
                    <Form-item :label-width="1">
                        <i-button icon="eye" @click="eyeImageLicense">预览图片</i-button>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="16">
                    <Form-item label="开户许可证" prop="openLicence">
                        <i-input v-model="merchant.openLicence" placeholder="开户许可证" readonly/>
                    </Form-item>
                </i-col>
                <i-col span="3">
                    <Form-item :label-width="1">
                        <Upload style="width: 300px;" action="../sys/oss/upload?prefix=merchant"
                                :format="['jpg','jpeg','png']"
                                max-size="2048"
                                :on-success="handleSuccessOpenLicence" :on-format-error="handleFormatError"
                                :show-upload-list="false"
                                :on-exceeded-size="handleMaxSize">
                            <i-button icon="ios-cloud-upload-outline">上传图片</i-button>
                        </Upload>
                    </Form-item>
                </i-col>
                <i-col span="3">
                    <Form-item :label-width="1">
                        <i-button icon="eye" @click="eyeImageOpenLicence">预览图片</i-button>
                    </Form-item>
                </i-col>
            </Row>
            <Form-item label="售卖商品简述" prop="institution">
                <i-input v-model="merchant.institution" placeholder="售卖商品简述"/>
            </Form-item>
            <Form-item label="开户银行" prop="value2">
                <i-input v-model="merchant.value2" placeholder="开户银行"/>
            </Form-item>
            <Form-item label="开户银行城市" prop="value5">
                <i-input v-model="merchant.value5" placeholder="开户银行城市"/>
            </Form-item>
            <Form-item label="开户支行" prop="value3">
                <i-input v-model="merchant.value3" placeholder="开户支行"/>
            </Form-item>
            <Form-item label="银行账户" prop="value4">
                <i-input v-model="merchant.value4" placeholder="银行账户"/>
            </Form-item>
            <Form-item label="状态" prop="statu">
                <Radio-group v-model="merchant.statu">
                    <Radio label="0">
                        <span>关闭</span>
                    </Radio>
                    <Radio label="1">
                        <span>启用</span>
                    </Radio>
                </Radio-group>
            </Form-item>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>
                返回</i-button>
                <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
    </Card>
</div>

<script src="${rc.contextPath}/js/merchant/merchant.js?_${date.systemTime}"></script>
</body>
</html>